package cyclic;

import org.springframework.beans.factory.BeanNameAware;

public class B implements BeanNameAware {
    private A a;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    private String name;


    @Override
    public String toString() {
        return "B{" +
                "name='" + name + '\'' +
                '}';
    }

    public A getA() {
        return a;
    }

    public B(A a) {
        this.a = a;
    }

    public void setA(A a) {
        this.a = a;
    }

    public B() {
    }

    @Override
    public void setBeanName(String s) {
        System.out.println(s);
    }
}
